﻿@{
    ViewBag.Title = "resetpassword";
    Layout = "~/Views/Shared/_Main.cshtml";
}
<div class="content">
    <div class="container">
        <div class="register">
            <div class="row">
                <div class="span12">
                    <div class="lrform" style="max-width: 600px;">
                        <h5>
                            重设密码</h5>
                        <div class="form">
                            <!-- Register form (not working)-->
                            <form id="form1" action="/account/setnewpassword" method="post" class="form-horizontal">
                            <input type="hidden" name="token" />
                            <input type="hidden" name="u" value="@ViewBag.U" />
                            <div class="control-group">
                                <label class="control-label">
                                    新密码
                                </label>
                                <div class="controls">
                                    <input type="password" id="txtpassword" name="password" class="span4 {required:true,minlength:6,maxlength:18}"
                                        placeholder="请输入新密码" />
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">
                                    重复密码
                                </label>
                                <div class="controls">
                                    <input type="password" id="txtconfirm" name="confirm" class="span4 {required:true,equalTo:'#txtpassword'}"
                                        placeholder="请再次输入新密码" />
                                </div>
                            </div>
                            <div class="control-group">
                                <div class="controls">
                                    <input type="submit" value="确定" class="btn btn-info" style="width: 20%" />
                                </div>
                            </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="border">
        </div>
        @Html.Partial("~/views/shared/partial/_article.cshtml")
    </div>
</div>

@section tail{
    <script type="text/javascript" src="/Scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.metadata.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#form1').validate({
                errorClass: "help-inline",
                errorElement: "span",
                highlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').addClass('error');
                },
                unhighlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').removeClass('error');
                }
            });
        });
    </script>
}